css: Fix printing of images
authorMatthias Clasen <mclasen@redhat.com>
Tue, 26 Apr 2016 04:01:59 +0000 (00:01 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Tue, 26 Apr 2016 04:03:09 +0000 (00:03 -0400)
When there is only a call in a fallback image, we were errnoneously
printing out a comma before it.

gtk/gtkcssimagefallback.c

index b7c3a9d224a82f2700a1462cc6b9e52e1fad29c3..620dd94862c40c8c27f8c1f271f655fa588a0df4 100644 (file)
@@ -99,7 +99,8 @@ gtk_css_image_fallback_print (GtkCssImage *image,
     }
   if (fallback->color)
     {
-      g_string_append (string, ",");
+      if (fallback->n_images > 0)
+        g_string_append (string, ",");
       _gtk_css_value_print (fallback->color, string);
     }